using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Core.Items;

namespace Frontends.Nodes
{
    public class ToDoItemTreeNode : TreeNode
    {
        private ToDoItem _item;

        public ToDoItemTreeNode(ToDoItem item) : base(item.Subject)
        {
            _item = item;
        }

        public override bool Equals(object obj)
        {
            if (obj is ToDoItemTreeNode)
            {
                return (obj as ToDoItemTreeNode).Item.Equals(Item);
            }
            return base.Equals(obj);
        }

        public ToDoItem Item
        {
            get
            {
                return _item;
            }
        }
    }
}
